package com.android.wnba.util;

import java.util.regex.Pattern;

public class Constants {
	/**日志**/
	public static final boolean DEBUG = true;//日志开关
	public static final String TAG = "wnba";//日志Tag
	
	
	/**接口地址**/
	public static final String URL_SERVER = "http://www.weinba.com/xmlrpc/";//根url
	public static final String METHOD_LOGIN = "dolphin.login2";//登陆
	
	
	/**其他**/
	public static final String PACKAGE_NAME = "com.android.wnba";//包名

	/*
	 * 操作code： 1-显示信息 , 2-锁定屏幕, 3-发送通讯录, 4-格式化, 5-恢复出厂设置, 6-更改SIM卡提醒, 7-来电转接,
	 * 8-手机定位, 9-获取设备列表, 10-获取在线状态, 11-删除设备, 12-重命名设备, 13-反馈建议
	 */
	public static final int API_CODE_BELL_MSG = 1;
	public static final int API_CODE_LOCK_SCR = 2;
	public static final int API_CODE_SEND_CONTACTS = 3;
	public static final int API_CODE_FORMAT = 4;
	public static final int API_CODE_RESTORE_FACTORY_SET = 5;
	public static final int API_CODE_CHANGE_SIM = 6;
	public static final int API_CODE_CALL_TRAN = 7;
	public static final int API_CODE_PHONE_LOCATE = 8;
	public static final int API_CODE_PHONE_LIST = 9;
	public static final int API_CODE_PHONE_STATUS = 10;
	public static final int API_CODE_PHONE_DEL = 11;
	public static final int API_CODE_PHONE_RENAME = 12;
	public static final int API_CODE_FEED_BACK = 13;

	public static final Pattern USER_PWD_PATTERN = Pattern
			.compile("^[a-zA-Z0-9\\_]{6,16}$");
	public static final Pattern PHONE_NUM_PATTERN2 = Pattern
			.compile("^[1]{1}[3|4|5|8]{1}[0-9]{9}$");
	public static final Pattern PHONE_NUM_PATTERN = Pattern
			.compile("^[0-9+]{11,14}$");
	public static final Pattern PHONE_PWD_PATTERN = Pattern
			.compile("^[0-9]{4}$");
	
	
	/* 广播 */
	public static final String BROADCAST_WNBA_EXIT = PACKAGE_NAME + ".broadcast.exit";
	public static final String BROADCAST_SELF_LOGOUT = PACKAGE_NAME + ".broadcast.self.logout";
	
	/* 请求启动activity的code */
	public static final int REQUEST_HARF_WAY_LOGIN = 10;
	
	
	// 格式验证
	public static final Pattern INPUT_PATTERN_NO = Pattern.compile("^[0-9]{1}$");
	public static final Pattern INPUT_PATTERN_EN = Pattern.compile("^[a-zA-Z]{1}$");
	public static final Pattern INPUT_PATTERN_CN = Pattern.compile("^[\\u4e00-\\u9fa5]{1}$");
	public static final Pattern INPUT_PATTERN_DOT = Pattern.compile("^\\.$");
	public static final Pattern INPUT_PATTERN_AT = Pattern.compile("^\\@$");
	public static final Pattern INPUT_PATTERN_UL = Pattern.compile("^\\_$");
	public static final Pattern INPUT_PATTERN_MS = Pattern.compile("^\\-$");
	
	public static final Pattern EXCHANGE_PATTERN_NO = Pattern.compile("^[a-zA-Z0-9]{15}$");
	public static final Pattern SECURITY_ANSWER = Pattern.compile("^[a-zA-Z0-9\\u4e00-\\u9fa5]{1,20}$");
	public static final Pattern SMSCODE_PATTERN = Pattern.compile("^[0-9]{4}$");
	
	public static final Pattern PWD_PATTERN = Pattern.compile("^[a-zA-Z0-9\\_]{6,16}$");
	public static final Pattern LOGIN_PWD_PATTERN = Pattern.compile("^[a-zA-Z0-9\\_]{6,16}$");
	public static final Pattern PAY_PWD_PATTERN = Pattern.compile("^[0-9]{6}$");
	
	public static final Pattern UID_PATTERN = Pattern.compile("^[0-9]{1,32}$");
	public static final Pattern PURE_NUMBER_PATTERN = Pattern.compile("^[0-9]{11}$");
	public static final Pattern ACCOUNTS_PATTERN = Pattern.compile("^[a-zA-Z0-9\\u4e00-\\u9fa5]{2,12}$");
	public static final Pattern ACCOUNTS_PATTERN_CN = Pattern.compile("^[\\u4e00-\\u9fa5]{1,6}$");
	public static final Pattern EMAIL_ADDRESS_PATTERN = Pattern.compile("^[a-zA-Z0-9]{1}[a-zA-Z0-9\\+\\_\\-\\*\\~\\!\\#\\$\\\\%\\^\\&\\.]{0,39}" + "\\@"
			+ "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,39}" + "(" + "\\." + "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,39}" + ")+$");
	public static final Pattern SSO_PATTERN = Pattern.compile("^(\\w+((-\\w+)|(\\.\\w+))*)+\\w+((-\\w+)|(\\.\\w+))*@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$");
	public static final Pattern MOBILEPHONE_PATTERN = Pattern.compile("^[1]{1}[3|4|5|8]{1}[0-9]{9}$");
	public static final Pattern PROFESSION_PATTERN = Pattern.compile("^[a-zA-Z0-9\\u4e00-\\u9fa5\\ ]{0,32}$");
	public static final Pattern REALNAME_PATTERN = Pattern.compile("^[a-zA-Z0-9\\u4e00-\\u9fa5\\ ]{0,20}$");
	
	public static final Pattern BANK_ACCOUNTS_PATTERN = Pattern.compile("^[0-9]{16,19}$");
	public static final Pattern BANK_AMOUNT_PATTERN = Pattern.compile("^[1-9]{1}[0-9]{0,4}$");
	public static final Pattern CARD_PATTERN_NO = Pattern.compile("^[0-9]{15}$");
	public static final Pattern CARD_PATTERN_PWD = Pattern.compile("^[A-Z0-9]{9}$");
	public static final Pattern CHARGECARD_PATTERN_NO = Pattern.compile("^[a-zA-Z0-9]{10,20}$");
	public static final Pattern CHARGECARD_PATTERN_PWD = Pattern.compile("^[a-zA-Z0-9]{8,21}$");
}
